package cate.common.table.farm.fbchallenge.row;

import cate.common.table.EExcelNoteField;
import cate.common.table.EExcelRowClass;
import cate.common.table.ERow;
import cate.common.table.farm.FightChallenge;
import cate.common.table.farm.OperOption;
import easy.java.dev.note.NoteField;

import java.util.List;

@EExcelRowClass(note = "命运之扉挑战条件 Row")
public class DestinyGateChallengeRow extends ERow implements FightChallenge {
    @EExcelNoteField(fieldName = "挑战类型")
    public int type;
    @EExcelNoteField(fieldName = "挑战参数")
    private String paramStr;
    @EExcelNoteField(fieldName = "检测操作")
    private String checkOperStr;
    @EExcelNoteField(fieldName = "目标值")
    private String valueStr;
    @EExcelNoteField(fieldName = "奖励")
    public String rewardStr;

    @NoteField("条件选项")
    List<OperOption> options;

    @Override
    public void decode() {
        options = createOperOption(paramStr, checkOperStr, valueStr);
    }


    @Override
    public int getType() {
        return type;
    }

    @Override
    public List<OperOption> getOperOptions() {
        return options;
    }

    @Override
    public int getHeroProto() {
        return 0;
    }
}
